package com.daocheng.dc.book.user.biz.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * @ClassName SexEnum
 * @author: 稻城
 * @date: 2025/3/26
 * @Version 1.0
 * @description: TODO
 */
@AllArgsConstructor
@Getter
public enum SexEnum {
    WOMAN(0),
    MAN(1);
    private final Integer value;

    public static boolean isValid(Integer value) {
        for (SexEnum loginTypeEnum : SexEnum.values()) {
            if (Objects.equals(value, loginTypeEnum.getValue())) {
                return true;
            }
        }
        return false;
    }
}
